package first.group.ssh.packet.reader;

import first.group.ssh.packet.PacketParser;
import java.nio.ByteBuffer;

public class ByteArrayReader {
    public static byte[] readNameList(ByteBuffer buffer, int len) {
        if (!PacketParser.bufferRemains(buffer, len)) {
            return null;
        }
        byte[] arr = new byte[len];
        buffer.get(arr);
        return arr;
    }
}
